<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/bluetooth/resources/bluetooth-test.js"></script>
<script src="/bluetooth/resources/bluetooth-fake-devices.js"></script>
<script>
'use strict';
bluetooth_test(
    () => {return setBluetoothFakeAdapter('EmptyNameHeartRateAdapter')
               .then(
                   () => requestDeviceWithTrustedClick(
                       {filters: [{services: ['heart_rate']}]}))
               .then(device => {
                 assert_equals(device.name, '');
               })},
    'An empty name device can be obtained by advertised service UUID.');
</script>
